package moc.egg;
import moc.compiler.*;
import moc.tds.*;
import moc.type.*;
import moc.gc.*;
import java.util.*;
import mg.egg.eggc.runtime.libjava.lex.*;
import mg.egg.eggc.runtime.libjava.*;
import mg.egg.eggc.runtime.libjava.messages.*;
import mg.egg.eggc.runtime.libjava.problem.IProblem;
import java.util.Vector;
public class S_SIX_MOC {
LEX_MOC scanner;
  S_SIX_MOC() {
    }
  S_SIX_MOC(LEX_MOC scanner, boolean eval) {
    this.scanner = scanner;
    this.att_eval = eval;
    this.att_scanner = scanner;
    }
int [] sync= new int[0];
  int att_targs;
  int att_taillev;
  int att_hdep;
  boolean att_eval;
  DTYPE att_rtype;
  String att_code;
  IMachine att_machine;
  boolean att_princ;
  TDS att_tds;
  LEX_MOC att_scanner;
  private void regle25() throws Exception {

    //declaration
    //appel
if  (att_eval)      action_code_25();
  }
  private void regle24() throws Exception {

    //declaration
    T_MOC x_2 = new T_MOC(scanner ) ;
    S_BLOC_MOC x_4 = new S_BLOC_MOC(scanner,att_eval) ;
    //appel
if  (att_eval)      action_auto_inh_24(x_4);
    x_2.analyser(LEX_MOC.token_sinon);
if  (att_eval)      action_tdsBLOC_24(x_4);
    x_4.analyser() ;
if  (att_eval)      action_code_24(x_4);
  }
private void action_code_25() throws Exception {
try {
// instructions
this.att_code="";
this.att_taillev=0;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#code","SIX -> #code ;"});
}
  }
private void action_code_24(S_BLOC_MOC x_4) throws Exception {
try {
// instructions
this.att_code=x_4.att_code;
this.att_taillev=0;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#code","SIX -> sinon #tdsBLOC BLOC #code ;"});
}
  }
private void action_tdsBLOC_24(S_BLOC_MOC x_4) throws Exception {
try {
// instructions
x_4.att_princ=false;
x_4.att_tds=this.att_tds;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#tdsBLOC","SIX -> sinon #tdsBLOC BLOC #code ;"});
}
  }
private void action_auto_inh_24(S_BLOC_MOC x_4) throws Exception {
try {
// instructions
x_4.att_hdep=this.att_hdep;
x_4.att_rtype=this.att_rtype;
x_4.att_targs=this.att_targs;
x_4.att_machine=this.att_machine;
}catch(RuntimeException e) {       att_scanner._interrompre(IProblem.Internal,att_scanner.getBeginLine(),ICoreMessages.id_EGG_runtime_error, CoreMessages.EGG_runtime_error,new Object[] { "MOC", "#auto_inh","SIX -> sinon #tdsBLOC BLOC #code ;"});
}
  }
  public void analyser () throws Exception {
    scanner.lit ( 1 ) ;
    switch ( scanner.fenetre[0].code ) {
      case LEX_MOC.token_sinon : // 3861
        regle24 () ;
      break ;
      case LEX_MOC.token_void : // 3862
        regle25 () ;
      break ;
      case LEX_MOC.token_int : // 3864
        regle25 () ;
      break ;
      case LEX_MOC.token_char : // 3865
        regle25 () ;
      break ;
      case LEX_MOC.token_entier : // 3887
        regle25 () ;
      break ;
      case LEX_MOC.token_chaine : // 3889
        regle25 () ;
      break ;
      case LEX_MOC.token_caractere : // 3888
        regle25 () ;
      break ;
      case LEX_MOC.token_plus : // 3875
        regle25 () ;
      break ;
      case LEX_MOC.token_moins : // 3876
        regle25 () ;
      break ;
      case LEX_MOC.token_non : // 3882
        regle25 () ;
      break ;
      case LEX_MOC.token_null : // 3867
        regle25 () ;
      break ;
      case LEX_MOC.token_paro : // 3852
        regle25 () ;
      break ;
      case LEX_MOC.token_ident : // 3890
        regle25 () ;
      break ;
      case LEX_MOC.token_mult : // 3878
        regle25 () ;
      break ;
      case LEX_MOC.token_new : // 3883
        regle25 () ;
      break ;
      case LEX_MOC.token_libere : // 3884
        regle25 () ;
      break ;
      case LEX_MOC.token_aco : // 3854
        regle25 () ;
      break ;
      case LEX_MOC.token_si : // 3859
        regle25 () ;
      break ;
      case LEX_MOC.token_tantque : // 3860
        regle25 () ;
      break ;
      case LEX_MOC.token_retour : // 3866
        regle25 () ;
      break ;
      case LEX_MOC.token_asm : // 3863
        regle25 () ;
      break ;
      case LEX_MOC.token_acf : // 3855
        regle25 () ;
      break ;
      default :
               scanner._interrompre(IProblem.Syntax, scanner.getBeginLine(), IMOCMessages.id_MOC_unexpected_token,MOCMessages.MOC_unexpected_token,new String[]{scanner.fenetre[0].getNom()});
    }
  }
  }
